package buzhidao;
class Student5{
    String name;
    int age;
    static String school="A University";
    public Student5(String name,int age){
        this.name=name;
        this.age=age;
    }
    public void info(){
        System.out.println("姓名:"+this.name+",年龄:"+this.age+",学校:"+school);
    }
}
public class StaticTest2 {
    public static void main(String[]args){
        Student5 stu1=new Student5("小A",17);
        Student5 stu2=new Student5("小B", 18);
        Student5 stu3=new Student5("小C",19);
        stu1.info();
        stu2.info();
        stu3.info();
        Student5.school="B University";
        System.out.println("修改stu1学生对象的学校信息为B大学后");
        stu1.info();
        stu2.info();
        stu3.info();
    }
}
